package cm.match.rule.expression;

import cm.match.dto.RuleDto;
import cm.match.rule.BaseRule;

/**
 * @author Administrator
 */
public class NotExpression implements Expression {

    private Expression rule;

    public NotExpression(Expression rule) {
        this.rule = rule;
    }

    @Override
    public boolean execute(RuleDto dto) {
        return !this.rule.execute(dto);
    }
}
